package com.nd.Utils;

import cn.hutool.crypto.digest.BCrypt;

public class BCryptTransStrUtils {

    public static String getEncodeStr(String password,String salt){
//        BCrypt
        String hashPw = BCrypt.hashpw(password);
        return hashPw;
    }

    public static boolean isRightPwd(String password,String hsahed,String salt){

        String hashPw = BCrypt.hashpw(password,salt);
        BCrypt.checkpw(password,hsahed);

        return hashPw.equals(hsahed);
    }
}
